package com.books4sale.admin.service;

import java.awt.List;
import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.books4sale.admin.dto.tools.Helper;

public class GetPageData extends HttpServlet {
	
	private int pageNumber = 1;
	private final static int PAGE_CAPACITY = 7;

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {

		pageNumber = Integer.parseInt(req.getParameter("page"));
		
	}
	
	private int getStartIndex(int pageNumber){
//		1) 1-7
//		2) 8-14
//		3) 15-21
		int startIndex = ((pageNumber-1)*7)+1;
		return startIndex;
	}
}
